Skip to content

fix(custom_fields): serialize legacy meeting objects as a list#875

Merged
palkerecsenyi merged 1 commit into
CERNDocumentServer:masterfrom
TahaKhan998:fix/issue-865-conference-ui-compatibility
Jul 24, 2026
Merged

fix(custom_fields): serialize legacy meeting objects as a list#875
palkerecsenyi merged 1 commit into
CERNDocumentServer:masterfrom
TahaKhan998:fix/issue-865-conference-ui-compatibility

Conversation

@TahaKhan998

@TahaKhan998 TahaKhan998 commented Jul 23, 2026

Copy link
Copy Markdown

Closes #865
This pr adds a serialize-only compatibility list field that wraps a legacy object as a one-item list for reads, leaves arrays unchanged.

)


class BackwardCompatibleMeetingList(fields.List):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking this one! wouldn't it be easier to implement this only on the new jinja template (CDSMeeting)? Did you consider that?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did think about that. A Jinja only fix in CDSMeeting.html would cover the record page, but the edit form still loads custom_fields through the schema dump into ArrayField, so a legacy object would still break there. Doing the wrap in serialize felt cleaner so both paths get a list without touching the widget or allowing object writes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah also the API response serializes it incorrectly too if only the jinja template is changed

@palkerecsenyi palkerecsenyi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect thanks @TahaKhan998! I think this is a very nice elegant simple way to do it, I can't see any problems with it. We will make sure to test in dev with object meeting field records (we might need to create some manually).

@palkerecsenyi
palkerecsenyi merged commit 4bc752d into CERNDocumentServer:master Jul 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI backward compatibility for object conference field

3 participants